package com.example.pojo.entitly;

import java.io.Serializable;

/**
 * 
 * @TableName supplier
 */
public class Supplier implements Serializable {
    /**
     * 
     */
    private Integer id;

    /**
     * 公司名
     */
    private String username;

    /**
     * 负责人姓名
     */
    private String principal;

    /**
     * 联系方式
     */
    private String contact;

    /**
     * 地址
     */
    private String site;

    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public Integer getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 公司名
     */
    public String getUsername() {
        return username;
    }

    /**
     * 公司名
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * 负责人姓名
     */
    public String getPrincipal() {
        return principal;
    }

    /**
     * 负责人姓名
     */
    public void setPrincipal(String principal) {
        this.principal = principal;
    }

    /**
     * 联系方式
     */
    public String getContact() {
        return contact;
    }

    /**
     * 联系方式
     */
    public void setContact(String contact) {
        this.contact = contact;
    }

    /**
     * 地址
     */
    public String getSite() {
        return site;
    }

    /**
     * 地址
     */
    public void setSite(String site) {
        this.site = site;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Supplier other = (Supplier) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUsername() == null ? other.getUsername() == null : this.getUsername().equals(other.getUsername()))
            && (this.getPrincipal() == null ? other.getPrincipal() == null : this.getPrincipal().equals(other.getPrincipal()))
            && (this.getContact() == null ? other.getContact() == null : this.getContact().equals(other.getContact()))
            && (this.getSite() == null ? other.getSite() == null : this.getSite().equals(other.getSite()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode());
        result = prime * result + ((getPrincipal() == null) ? 0 : getPrincipal().hashCode());
        result = prime * result + ((getContact() == null) ? 0 : getContact().hashCode());
        result = prime * result + ((getSite() == null) ? 0 : getSite().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", username=").append(username);
        sb.append(", principal=").append(principal);
        sb.append(", contact=").append(contact);
        sb.append(", site=").append(site);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}